import React, { Component} from 'react';
import MRouter from './router/IndexRouter'
import './views/css/App.css'
import Tabbar from './components/Tabber';
import store from './redux/store';

export class App extends Component {
    //是否展示tabber
    state = {
        show: true
    }
   
    // store.subscribe 订阅
    // cdm
    componentDidMount() { 
        store.subscribe(()=>{
            console.log("app 中订阅")
            console.log(store.getState())
            this.setState({
                show: store.getState().TabberReducer.show
               })
        })
           }
    render() {
        return (
           <div>
                {/* 其他的内容 */}
                <MRouter>
                    {/* {this.show} */}
                    {/* {this.state.show ? <Tabbar></Tabbar> : ''} */}
                </MRouter>
           </div>
        )
    }
}